<template>
	<view style="width: 90%;margin: 0 auto;">
		<view class="bl">
			<view class="bl-1">处理时间:</view>
			<view class="bl-2">
				<picker mode="date" :value="info.date" :start="info.startDate" :end="info.endDate" @change="dateChange">
					<view>{{ info.date }}</view>
				</picker>
				<!-- <custompickerdate ref="custompickerdate"></custompickerdate> -->
			</view>
		</view>
		<view class="bl">
			<view class="bl-1">处理人:</view>
			<view class="bl-2"><input v-model="info.userName" /></view>
		</view>
		<view class="bl-textarea">
			<view class="bl-1">处理意见:</view>
			<view class="bl-2"><textarea class="textarea" placeholder="请输入" v-model="info.remark"></textarea></view>
		</view>
		<uploadImage ref="uploadImageout"></uploadImage>

		<view class="button" @tap="Submit">提交</view>
	</view>
</template>

<script>
Array.prototype.remove = function(val) {
	var index = this.indexOf(val);
	if (index > -1) {
		this.splice(index, 1);
	}
};
import uploadImage from '../../components/uploadImage';
export default {
	components: {
		uploadImage
		// custompickerdate
	},
	data() {
		return {
			info: {
				startDate: '2020-9-10',
				endDate: '2020-12-10',
				date: this.utildate.formatTime(new Date()),
				userName: '',
				remark: ''
			}
		};
	},
	onLoad() {
		console.log('utildate', this.utildate.formatTime(new Date()));
		uni.setNavigationBarTitle({
			title: '趣味表情'
		});
	},
	methods: {
		Submit() {
			console.log(this.$refs.uploadImageout.files);
			console.log(this.info);
		},
		dateChange(e) {
			this.info.date = e.target.value;
			console.log(e);
		}
	}
};
</script>
<style lang="scss">
.bl {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	height: 70upx;
	border-bottom: 1px solid #d6d6d6;
	width: 100%;
	line-height: 30upx;
}
.bl-1 {
	font-size: 13px;
	color: #000;
	width: 20%;
}
.bl-2 {
	width: 80%;
}

.bl-textarea {
	display: flex;
	justify-content: flex-start;
	/* align-items: center; */
	border-bottom: 1px solid #d6d6d6;
	width: 100%;
	margin-top: 35upx;
}
.textarea {
	border: 1px solid #fff;
	width: 100%;
	height: 300upx;
}
.button {
	background-color: #4caf50; /* Green */
	border: none;
	color: white;
	width: 100%;
	margin: 30upx 0;
	height: 100upx;
	line-height: 100upx;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
	border-radius: 10upx;
}
page {
	background: #ffffff;
}
</style>
